package com.sjy.MyBlog.web;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.SessionAttribute;
import org.springframework.web.bind.annotation.SessionAttributes;

import com.sjy.MyBlog.biz.impl.UserBizImpl;

@Controller
@SessionAttributes("currentPage")
public class AboutAction {

	@Resource
	private UserBizImpl ub;
	
	@GetMapping("toAbout.do")
	public String toAbout(Model m,@SessionAttribute("currentPage") String currentPage) {
		currentPage="about::aboutBody";
		m.addAttribute("currentPage", currentPage);
		m.addAttribute("user", ub.selectUser());
		
		return currentPage;
	}
}
